package com.msjh.vueservice.controller;


import com.msjh.vueservice.common.R;
import com.msjh.vueservice.service.VisualService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zy
 * @since 2022-06-13
 */
@RestController
@RequestMapping("/visual")
@CrossOrigin
public class VisualController {

    @Autowired
    private VisualService visualService;

    @GetMapping("/list")
    public R getAllVisuals(){
        return R.ok().data("visual",visualService.getAllVisuals());
    }

}

